package com.dxysun.design.interpreter;

public class Main
{
    public static void main(String[] args)
    {
        Context context = new Context();

        context.setExpression("1 + 2 - 4");
        TerminalExpression terminalExpression = new TerminalExpression();
        System.out.println(terminalExpression.interpreter(context));
        NonTerminalExpression nonTerminalExpression = new NonTerminalExpression();
        System.out.println(nonTerminalExpression.interpreter(context));

    }
}
